﻿// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Actor/AudioActor.h"
#include "Actor/CreateBossPoint.h"
#include "Actor/CreateEnemyPoint.h"
#include "GameFramework/GameModeBase.h"
#include "UMG/GameOverWidget.h"
#include "UMG/MainUIWidget.h"
#include "UMG/PauseWidget.h"
#include "CombatGameMode.generated.h"

/**
 * 
 */
UCLASS()
class COMBAT_GAME_CPP_API ACombatGameMode : public AGameModeBase
{
	GENERATED_BODY()

public:
	ACombatGameMode();
	virtual void BeginPlay() override;

	void AddCreatePoint(ACreateEnemyPoint* CreateEnemyPoint);

public:
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	TSubclassOf<UUserWidget> MainUIClass;

	UPROPERTY(BlueprintReadWrite)
	UMainUIWidget* MainUI;

	UFUNCTION(Blueprintable)
	void PlayBloodScreenAnim();

	UPROPERTY(BlueprintReadOnly)
	TArray<ACreateEnemyPoint*> CreateEnemyPoints;

	UPROPERTY(BlueprintReadOnly)
	ACreateBossPoint* CreateBossPoint;

	UPROPERTY(BlueprintReadOnly, VisibleAnywhere)
	bool CanCreateBoss = false;

	UPROPERTY(BlueprintReadOnly, VisibleAnywhere)
	int32 EnemyNum = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	TSubclassOf<UUserWidget> GameOverUIClass;

	UPROPERTY(BlueprintReadWrite)
	UGameOverWidget* GameOverUI;

	UFUNCTION(BlueprintCallable)
	void ChangeToGameOverUI(const FText& GameOverDesText);

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	TSubclassOf<UUserWidget> PauseWidget;

	UPROPERTY(BlueprintReadWrite)
	UPauseWidget* GamePauseUI;
	
	UFUNCTION(BlueprintCallable)
	void ChangeToGamePauseUI();


	UFUNCTION(BlueprintCallable)
	void BackToMainUI();

	
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	TSubclassOf<AAudioActor> AudioActorClass;

	UPROPERTY(BlueprintReadWrite)
	AAudioActor* AudioActor;
	
};
